STEP 7: Let's use our program to count the number of times each color appears!

We'll use a list to store the number of times each value in our sample space appears in the experimental data.

  • In LOGIC, click on . Drag out Empty List. Drop it outside of your loop.
  • Rename it freq_list.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)